package tgc.edu.library.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import tgc.edu.library.custom.CommonRepository;
import tgc.edu.library.entity.Book;
import tgc.edu.library.entity.BorrowRecord;
import tgc.edu.library.entity.Reader;

@Repository
public interface BorrowRecordRepository extends CommonRepository<BorrowRecord, Integer>{

	public Page<BorrowRecord> findByReader(Reader reader, Pageable pageable);

	public List<BorrowRecord> findByReaderAndStatus(Reader reader, String string);

	public BorrowRecord findByReaderAndBook(Reader reader, Book book);

	public Page<BorrowRecord> findByReaderAndStatus(Reader user, String string, Pageable pageable);

}
